package com.adopapa.ethexplorer.service;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.adopapa.ethexplorer.domain.UserInfo;

@Repository
public interface UserInfoRepository extends JpaRepository<UserInfo, String>, JpaSpecificationExecutor<UserInfo> {

	List<UserInfo> findByLoginName(String loginName);

	@Query("FROM UserInfo WHERE walletInfo.address = ?1")
	List<UserInfo> getUserInfoByAddress(String address);

}
